package cn.xyy.system.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.xyy.common.domain.mvc.Page;
import cn.xyy.system.dao.NoticeDao;
import cn.xyy.common.domain.system.notice.Notice;
import cn.xyy.common.domain.system.notice.NoticeVO;

/**
 * 通知业务层
 * 
 * @author xyy
 *
 */
@Service
public class NoticeService {
	@Autowired
	private NoticeDao noticeDao;

	public Page<Notice> getMessagePage(NoticeVO vo) {
		return noticeDao.selectPage(vo);
	}

	public void insert(Notice notice) {
		noticeDao.insert(notice);
	}

	public void update(Notice notice) {
		noticeDao.update(notice);
	}

	public void delete(Integer id) {
		noticeDao.delete(new Notice().setId(id));
	}

	public Notice getNoticeInfo(Integer id) {
		return noticeDao.selectOne(new Notice().setId(id));
	}

}
